<?php
//wap main页面
use yii\helpers\Html;
$this->title = empty($this->title) ? Yii::$app->params['_title'] : $this->title ;
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="format-detection" content="telephone=no" />
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<link rel="shortcut icon" href="<?= Yii::getAlias('@static')?>/pc/common/images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?=Yii::getAlias('@static')?>/wap/common/css/common.css">
<?php
//导入头部css
if (isset($this->blocks['css'])) {
    echo $this->blocks['css'];
}
//导入头部js
if(isset($this->blocks['headjs'])) {
    echo  $this->blocks['headjs'];
}
?>
</head>
<body class="<?=$this->context->bodyClass;?>">
<?php $this->beginBody()?>
<!-- 正文内容 -->
<?=$content;?>

<!-- 微信分享文案,其他浏览器自动忽略 -->
<?= common\widgets\WeChatShareWidget::widget(['type'=>$this->context->layout_data]);?>

<?php $this->endBody() ?>

<?php if (isset($this->blocks['js'])): ?>
    <?= $this->blocks['js'] ?>
<?php endif; ?>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?1217dcdaa1236fc59a1cdbb787155dc3";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
</body>
</html>
<?php $this->endPage() ?>
